package com.jt.system.service;

import com.jt.pojo.User;
import com.jt.system.dao.UserMapper;
/*import com.jt.system.pojo.User;*/
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper userMapper;
    @Override
    public User selectUserById(String username) {
        return userMapper.selectUserByUsername(username);
    }

    @Override
    public List<String> selectUserPermissions(Long userId) {
        //方案一：在这里可以调用数据层的单表查询方法，查询三次获取用户信息
        //方案二：在这里可以调用数据层的多表嵌套查询或多表关联方法执行一次查询
        return userMapper.selectUserPermissions(userId);
    }
}
